

import Vue from 'vue';
import VueResource from 'vue-resource';
import Vuex from 'vuex';

import App from './App';
import router from './router';

Vue.use(VueResource);
Vue.use(Vuex);

let store = new Vuex.Store({
	//仓库
	
	//状态
	state: {
		bigState:false
	},
	//行为：用来改变状态
	mutations: {
		changeState(state){
			state.bigState = !state.bigState;
		}
	}
});



new Vue({
	el: '#app',
	render:h=>h(App),
	router,
	store: store
});
// vuex: vuex是vue项目的仓库(store), 用于状态(state)存储和改变(mutition)